package cn.yuanqiao.archive.storeRoom.mapper;


import cn.yuanqiao.archive.appManager.domain.DataScopeBase;
import cn.yuanqiao.archive.storeRoom.domain.Humiture;
import cn.yuanqiao.common.annotation.DataScope;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 温湿度登记Mapper接口
 * 
 * @author xy
 * @date 2023-06-16
 */
@Mapper
public interface HumitureMapper 
{
    /**
     * 查询温湿度登记
     * 
     * @param id 温湿度登记主键
     * @return 温湿度登记
     */
    public Humiture selectHumitureById(@Param("id") Long id, @Param("code")String code);

    /**
     * 查询温湿度登记列表
     * 
     * @param humiture 温湿度登记
     * @return 温湿度登记集合
     */
    @DataScope(deptAlias = "d", userAlias = "a",deptColumn = "DEPT_ID",userColumn = "CREATOR")
    public List<Humiture> selectHumitureList(@Param("dataScopeBase") DataScopeBase dataScopeBase, @Param("humiture") Humiture humiture, @Param("code")String code);

    /**
     * 新增温湿度登记
     * 
     * @param humiture 温湿度登记
     * @return 结果
     */
    public int insertHumiture(@Param("humiture") Humiture humiture, @Param("code")String code);

    /**
     * 修改温湿度登记
     * 
     * @param humiture 温湿度登记
     * @return 结果
     */
    public int updateHumiture(@Param("humiture") Humiture humiture, @Param("code")String code);

    /**
     * 删除温湿度登记
     * 
     * @param id 温湿度登记主键
     * @return 结果
     */
    public int deleteHumitureById(@Param("id")Long id, @Param("code")String code);

    /**
     * 批量删除温湿度登记
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteHumitureByIds(@Param("ids")Long[] ids, @Param("code")String code);
}
